package com.zx.callback.common.enums;

/**
 * @author ：yanst
 * @since: 2017/10/12
 * @history：(date editor desc)
 */
public enum UsefulStateEnum {
    ENABLE((byte)0,"未冻结"),
    DISABLE((byte)1,"冻结"),

    ;
    UsefulStateEnum(byte  key, String value) {
        this.key = key;
        this.value = value;
    }


    public static boolean contains(Byte key) {
        if (key != null) {
            for (UsefulStateEnum e : UsefulStateEnum.values()) {
                if (e.getKey() == key.byteValue()) {
                    return true;
                }
            }
        }
        return false;
    }

    private byte key;

    private String value;

    public byte getKey() {
        return key;
    }

    public void setKey(byte key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
